import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "../Public/SEntityId";
type int = number;
//class SFriendOnlineStatusMsg
    
    export  class SFriendOnlineStatusMsg extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SFriendOnlineStatusMsg();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.fromPlayerId);
            arg1.writeString(this.fromPlayerName);
            this.entityId.__write(arg1);
            arg1.writeInt(this.toPlayerId);
            arg1.writeInt(this.flag);
            arg1.writeBool(this.onlinestatus);
            arg1.writeInt(this.fromPlayerLevel);
            arg1.writeByte(this.VIP);
            arg1.writeInt(this.intimate);
            arg1.writeByte(this.avatar);
            arg1.writeInt(this.photo);
            arg1.writeByte(this.sex);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.fromPlayerId = arg1.readInt();
            this.fromPlayerName = arg1.readString();
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.toPlayerId = arg1.readInt();
            this.flag = arg1.readInt();
            this.onlinestatus = arg1.readBool();
            this.fromPlayerLevel = arg1.readInt();
            this.VIP = arg1.readByte();
            this.intimate = arg1.readInt();
            this.avatar = arg1.readByte();
            this.photo = arg1.readInt();
            this.sex = arg1.readByte();
            return;
        }

        public /* const */_type: int=12018;

        public /* var */fromPlayerId: int;

        public /* var */fromPlayerName: string;

        public /* var */entityId: SEntityId;

        public /* var */toPlayerId: int;

        public /* var */flag: int;

        public /* var */onlinestatus: Boolean;

        public /* var */fromPlayerLevel: int;

        public /* var */VIP: int;

        public /* var */intimate: int;

        public /* var */avatar: int;

        public /* var */photo: int;

        public /* var */sex: int;

        public static /* var */_regist: SFriendOnlineStatusMsg;
    }

            SFriendOnlineStatusMsg._regist = new SFriendOnlineStatusMsg(true);
        